﻿

using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;


public class BLL_tbl_qc_rm
{
    public BLL_tbl_qc_rm()
    {

    }

    public List<tbl_qc_rm> select(int ID)
    {
        DAL_tbl_qc_rm dal = new DAL_tbl_qc_rm();
        return dal.select(ID);
    }

    public List<tbl_qc_rm> selectAll()
    {
        DAL_tbl_qc_rm dal = new DAL_tbl_qc_rm();
        return dal.selectAll();
    }

    public DataTable selectAllForGrid()
    {
        DAL_tbl_qc_rm dal = new DAL_tbl_qc_rm();
        return dal.selectAllForGrid();
    }
    public bool insert(List<tbl_qc_rm> list)
    {
        bool ret = false;
        DAL_tbl_qc_rm dal = new DAL_tbl_qc_rm();
        ret = dal.insert(list);
        return ret;
    }

    public bool insert(tbl_qc_rm tbl)
    {
        DAL_tbl_qc_rm dal = new DAL_tbl_qc_rm();
        int i = 0;
        i = dal.insert(
            tbl.RM_Order_Number
, tbl.Bag_Number
, tbl.Drum_Number
, tbl.Date
, tbl.Al
, tbl.C
, tbl.Ca
, tbl.Fe
, tbl.Grade
, tbl.CREATED_BY
, tbl.CREATED_DATE
        );

        return Convert.ToBoolean(i);
    }

    public bool update(List<tbl_qc_rm> list)
    {
        bool ret = false;
        DAL_tbl_qc_rm dal = new DAL_tbl_qc_rm();
        ret = dal.update(list);
        return ret;
    }

    public bool update(tbl_qc_rm tbl)
    {
        DAL_tbl_qc_rm dal = new DAL_tbl_qc_rm();
        int i = 0;
        i = dal.update(
            tbl.ID
, tbl.RM_Order_Number
, tbl.Bag_Number
, tbl.Drum_Number
, tbl.Date
, tbl.Al
, tbl.C
, tbl.Ca
, tbl.Fe
, tbl.Grade
, tbl.UPDATED_BY
, tbl.UPDATED_DATE
            );

        return Convert.ToBoolean(i);
    }


    public bool delete(tbl_qc_rm tbl)
    {
        DAL_tbl_qc_rm dal = new DAL_tbl_qc_rm();
        int i = 0;
        i = dal.delete(
                tbl.ID
        );

        return Convert.ToBoolean(i);
    }


}

